import * as Common from "@loaders/commons";
import { OBJLoader } from "@loaders/obj";
import { GLTFLoader } from "@loaders/gltf";

// Common.setPathPrefix("http://a.com/xxx/");

// console.log(Common.getPathPrefix());

// Common.addAliases("a");
// Common.addAliases("ab");
// Common.addAliases("abc");

// console.log(Common.relativePath("https://b.com/a/b/c.obj", "dd/ss.cc"));
// console.log(Common.relativePath("https://b.com/a/b/c.obj", "ss.cc"));
// console.log(Common.relativePath("https://b.com/a/b/c.obj", "/ss.cc"));
// console.log(Common.relativePath("https://b.com/a/b/c.obj", "./ss.cc"));

// console.log(Common.resolvePath("a/b/c"));
// console.log(Common.resolvePath("https://b.com/a/b/c"));
// console.log(Common.resolvePath("xxx/a/b/c"));
// console.log(Common.dirname("xxx/a/b/c"));
// console.log(Common.dirname("https://b.com/a/b/c"));

// console.log(Common.join("./a", "b", "/cc"));

// console.log(Common.toBase64("test"));
// console.log(Common.hexToBase64("f85d741"));
// console.log(Common.toHex(16)); //10 hex

// Common.request("/some/url").then((res) => {
//   console.log(res);
// });
// console.log(new OBJLoader("/dev-static/obj/test/color.obj"))
// console.log(new GLTFLoader("/dev-static/gltf/2.0/Box/glTF-Embedded/Box.gltf"))
// console.log(new GLTFLoader("/dev-static/gltf/2.0/BoxTextured/glTF-Binary/BoxTextured.glb"))
// OBJ.downloadMeshes(
//   {
//     obj: "/dev-static/obj/windmill/windmill.obj",
//     mtl: "/dev-static/obj/windmill/windmill.mtl",
//     downloadMtlTextures: true
//   },
//   (meshes) => {
//     console.log(meshes);
//   },
//   {}
// );
